Applications (e.g., code editors) that can be employed to manipulate electronic data (e.g., code, documents, images, audio . . . ) often utilize a representation of the data to facilitate modifying (e.g., creating, editing, and removing) all or selective portions of such data. With these applications, the representation typically is generated when a user performs an action (e.g., launches an application and opens a document) that indicates a desire to modify the data. The user can employ the representation to indirectly modify the data via the representation, wherein a modification made to the representation is eventually translated to the original data in the application.
After a representation is generated, the data can be directly modified. When the data is modified, the representation no longer reflects a current state of the data so the modification needs to be translated to the representation. Similar to above, the modification is eventually translated to the data representation. In addition, other applications can be concurrently invoked to manipulate the data. These applications can work directly on the data, utilize an existing representation or elicit generation of other representations. Likewise, the above noted modifications (made to the representation and data) must be translated to all other representations and any modification to another representation must be translated to the data and its respective representations in order to synchronize the data with associated representations.
Conventionally, modification translation (for the above scenarios) from data or representation to representation or data is delayed. For example, with many applications the user commits changes, for example, after some period of time or upon exiting the application. However, this type of commitment can introduce delay in the translation, which can result in periods where the data does not reflect the representation and the representation does not reflect the data. The foregoing presents several challenges to ensuring the integrity of the data. For example, when data and an associated representation do not reflect each other, the representation can be utilized to make or attempt to make erroneous modification to the data.
By way of example, a programmer may desire to modify source code. Upon invoking an editor, a representation of the source code can be generated and utilized by the programmer to edit the source code. For example, the programmer may add a method to a class in the representation. However, if the class is removed from the source code after the representation is generated and the representation is not updated to reflect the class removal, the representation can be modified with the addition of the new method, even though the class no longer exists in the source code. Such editing complications can arise, for example, with a plurality of users editing code wherein such synchronization is crucial to produce efficient results. When the modification (the new method) to the representation is eventually translated from the representation to the source code, unexpected and/or undesired results may occur. For example, the method can be erroneously translated and not discovered until the source code is compiled, which can necessitate debugging and rolling back the modification. In another example, the invalid translation may cause the application to crash or lock-up. Additionally, the translation may result in lost code or a corrupt file. In still another example, the invalid translation may occur without an indication, wherein running the executable code may render undesired results.
Traditionally, tags within source code have been utilized in order to mitigate errors associated with the synchronization of source code and data representation applications. However, tags within source code can become cumbersome and/or over-bearing for a program and/or programmer. Moreover, source code containing multiple tags can overwhelm and end up controlling the code. For example, a programmer can utilize tags throughout a source code, yet such tags would flood the source code to defeat the purpose as a higher-level source of interpretation. Moreover, tags (e.g., XML tags) make merging difficult based at least upon merge conflicts. Additionally, developers and/or programmers are limited in flexibility with code containing auto-generated tags. Turning to FIG. 12, a sample portion of code is illustrated wherein tags are utilized to facilitate synchronization, wherein two tag-lines of code are referenced by 1202. As seen from the example, tags can be extremely counter-productive within a development process.
In view of the above, there is a need to improve upon and or provide systems and/or methods relating to the synchronization of code with a data representation application.